﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

using System.Text;
using System.Windows.Forms;

namespace Itegracion.Framework.Forms
{
    public partial class fmSeleccion : fmProceso
    {
        public fmSeleccion()
        {
            InitializeComponent();
        }

        protected override void OnLoad()
        {   
        }

        private void listado_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter) {
                this.DialogResult = DialogResult.OK;
                Hide();
            }
        }
        public DataRow Fila {
            get {
                return (listado.SelectedRows[0].DataBoundItem as DataRowView).Row as DataRow;
            }
        }

        private void listado_DoubleClick(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            Hide();
        }

        private void listado_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                e.SuppressKeyPress = true;
        }
    }
}
